← Back to issue list

The 'url' of 'package-repositories' can't handle PPA token from the environment variable

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2007480
Type
issue
State
open
Author
~laiderlai
Labels
Created
2023-02-16 05:10:32.913180+00:00
Updated
2023-02-16 05:10:32.913180+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

snapcraft version: 7.2.9, rev 8619 snapcraft.yaml content: package-repositories: - type: apt architectures: [arm64] components: [main] suites: [jammy] key-id: <PPA ID> url: https://${PPA_ACCESS_TOKEN}@private-ppa.launchpadcontent.net/<team>/<project>/ubuntu Build command: sudo env PPA_ACCESS_TOKEN="<account>:<token>" SNAPCRAFT_BUILD_ENVIRONMENT="host" snapcraft Problem: Since the PPA token is sensitive information for account permission. In general, we will not put the token content into snapcraft.yaml directly and use an environment parameter to provide the token content. We found the 'url' of 'package-repositories' can't handle token from the environment variable. The snapcraft create /etc/apt/sources.list.d/snapcraft-https_PPA_ACCESS_TOKEN_private_ppa_launchpadcontent..._ubuntu.sources directly with "URIs: https://${PPA_ACCESS_TOKEN}@private-ppa.launchpadcontent.net/<team>/<project>/ubuntu" Is this expected behavior? If yes, could the team make snapcraft support to transfer url with the environment parameter? The reason is we should not put PPA token information from somebody's account and upload it to a public place.

Evaluation history

No evaluation history available.